package com.changgou.user.feign;

import com.changgou.user.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 *
 */
@FeignClient(name = "user")
@RequestMapping("/user")
public interface UserFeign {


    /**
     * 根据用户名, 到数据库中的消费者用户表中获取用户数据返回
     * @param username
     * @return
     */
    @GetMapping("/load/{username}")
    public User login(@PathVariable(value = "username") String username);
}
